Trying to get rid of passing arguments for each new file created in order to run that specific file, if multiple files are there. (Horrible title, i know. Please bare with my english)
Okay so, i was also trying the same, running python3.8 with Xcode12 and with the same method as you have stated. I got to know that in 'Arguments' tab when stating $(SRCROOT)/<your filename>.py, the Xcode (or the system, whatever) is not interpreting it as a command, its just simply passing it as a string (unfortunately). So, in the 'Options' tab i checked the option for Use custom working directory and specified the project folder where my actual python code file was and simply specifying the filename in the 'Arguments' tab. you got the point, right ?
Now, before this, what i was trying to do, is to pass $(SRCROOT)/$(ls -1t | head -1) to the arguments so that, i no need to pass the file name in arguments for each time i create a new python code file. For example: If i created program1.py then, i no need to specify this in arguments as $(ls -1t | head -1) will output the most recently modified file. So, even if i have created more than 1 file i just need to trigger a very minor change and then save it so that it became the most recent modified file, like adding space at the very end or pressing return key to add a new line, as this will make a effect of file being modified but no change to the program logic. I hope you people get it what i am trying to achieve here.
But unfortunately, it is taking the arguments passed as string and not being interpreted as a command. Please, do help here.